export enum CardKinds {
    Blue,
    Green,
    Purple,
    Red,
    White,
    Yellow,
}

// 卡片需要的宝石样式
export const cardClass: Record<CardKinds, string> = {
    [CardKinds.Blue]: 'reward-blue',
    [CardKinds.Green]: 'reward-green',
    [CardKinds.Purple]: 'reward-purple',
    [CardKinds.Red]: 'reward-red',
    [CardKinds.White]: 'reward-white',
    [CardKinds.Yellow]: 'reward-yellow',
};

export interface Category {
    key: number;
    target: CardKinds; // 奖励卡颜色
    score: number; // 卡片得分
    materials: Array<{ material: CardKinds; need: number }>;
}

// 一级卡
export const categoryOne: Category[] = [
    // 红色卡
    {
        target: CardKinds.Red,
        key: 0,
        score: 1,
        materials: [{ material: CardKinds.White, need: 4 }],
    },
    {
        target: CardKinds.Red,
        key: 1,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 2 },
            { material: CardKinds.Green, need: 1 },
            { material: CardKinds.Purple, need: 2 },
        ],
    },
    {
        target: CardKinds.Red,
        key: 2,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 2 },
            { material: CardKinds.Green, need: 1 },
            { material: CardKinds.Blue, need: 1 },
            { material: CardKinds.Purple, need: 1 },
        ],
    },
    {
        target: CardKinds.Red,
        key: 3,
        score: 0,
        materials: [{ material: CardKinds.White, need: 3 }],
    },
    {
        target: CardKinds.Red,
        key: 4,
        score: 0,
        materials: [
            { material: CardKinds.Blue, need: 2 },
            { material: CardKinds.Green, need: 1 },
        ],
    },
    {
        target: CardKinds.Red,
        key: 5,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 2 },
            { material: CardKinds.Red, need: 1 },
        ],
    },
    {
        target: CardKinds.Red,
        key: 6,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 1 },
            { material: CardKinds.Red, need: 1 },
            { material: CardKinds.Purple, need: 3 },
        ],
    },
    {
        target: CardKinds.Red,
        key: 7,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 2 },
            { material: CardKinds.Green, need: 1 },
            { material: CardKinds.Blue, need: 1 },
            { material: CardKinds.Purple, need: 1 },
        ],
    },
    // 绿色卡
    {
        target: CardKinds.Green,
        key: 8,
        score: 0,
        materials: [{ material: CardKinds.Red, need: 3 }],
    },
    {
        target: CardKinds.Green,
        key: 9,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 2 },
            { material: CardKinds.Blue, need: 1 },
        ],
    },
    {
        target: CardKinds.Green,
        key: 10,
        score: 1,
        materials: [{ material: CardKinds.Purple, need: 4 }],
    },
    {
        target: CardKinds.Green,
        key: 11,
        score: 0,
        materials: [
            { material: CardKinds.Red, need: 2 },
            { material: CardKinds.Blue, need: 1 },
            { material: CardKinds.Purple, need: 2 },
        ],
    },
    {
        target: CardKinds.Green,
        key: 12,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 1 },
            { material: CardKinds.Blue, need: 1 },
            { material: CardKinds.Red, need: 1 },
            { material: CardKinds.Purple, need: 2 },
        ],
    },
    {
        target: CardKinds.Green,
        key: 13,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 1 },
            { material: CardKinds.Blue, need: 1 },
            { material: CardKinds.Red, need: 1 },
            { material: CardKinds.Purple, need: 1 },
        ],
    },
    {
        target: CardKinds.Green,
        key: 14,
        score: 0,
        materials: [
            { material: CardKinds.Green, need: 1 },
            { material: CardKinds.Blue, need: 3 },
            { material: CardKinds.White, need: 1 },
        ],
    },
    {
        target: CardKinds.Green,
        key: 15,
        score: 0,
        materials: [
            { material: CardKinds.Red, need: 2 },
            { material: CardKinds.Blue, need: 2 },
        ],
    },
    // 紫色卡
    {
        target: CardKinds.Purple,
        key: 16,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 1 },
            { material: CardKinds.Green, need: 1 },
            { material: CardKinds.Blue, need: 1 },
            { material: CardKinds.Red, need: 1 },
        ],
    },
    {
        target: CardKinds.Purple,
        key: 17,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 2 },
            { material: CardKinds.Red, need: 1 },
            { material: CardKinds.Blue, need: 2 },
        ],
    },
    {
        target: CardKinds.Purple,
        key: 18,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 1 },
            { material: CardKinds.Green, need: 1 },
            { material: CardKinds.Blue, need: 2 },
            { material: CardKinds.Red, need: 1 },
        ],
    },
    {
        target: CardKinds.Purple,
        key: 19,
        score: 0,
        materials: [
            { material: CardKinds.Red, need: 3 },
            { material: CardKinds.Green, need: 1 },
            { material: CardKinds.Purple, need: 1 },
        ],
    },
    {
        target: CardKinds.Purple,
        key: 20,
        score: 1,
        materials: [{ material: CardKinds.Blue, need: 4 }],
    },
    {
        target: CardKinds.Purple,
        key: 21,
        score: 0,
        materials: [
            { material: CardKinds.Red, need: 1 },
            { material: CardKinds.Green, need: 2 },
        ],
    },
    {
        target: CardKinds.Purple,
        key: 22,
        score: 0,
        materials: [{ material: CardKinds.Green, need: 3 }],
    },
    {
        target: CardKinds.Purple,
        key: 23,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 2 },
            { material: CardKinds.Green, need: 2 },
        ],
    },
    // 蓝色
    {
        target: CardKinds.Blue,
        key: 24,
        score: 0,
        materials: [
            { material: CardKinds.Green, need: 3 },
            { material: CardKinds.Red, need: 1 },
            { material: CardKinds.Blue, need: 1 },
        ],
    },
    {
        target: CardKinds.Blue,
        key: 25,
        score: 0,
        materials: [
            { material: CardKinds.Green, need: 2 },
            { material: CardKinds.Purple, need: 2 },
        ],
    },
    {
        target: CardKinds.Blue,
        key: 26,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 1 },
            { material: CardKinds.Green, need: 1 },
            { material: CardKinds.Red, need: 1 },
            { material: CardKinds.Purple, need: 1 },
        ],
    },
    {
        target: CardKinds.Blue,
        key: 27,
        score: 1,
        materials: [{ material: CardKinds.Red, need: 4 }],
    },
    {
        target: CardKinds.Blue,
        key: 28,
        score: 0,
        materials: [
            { material: CardKinds.Green, need: 2 },
            { material: CardKinds.Red, need: 2 },
            { material: CardKinds.White, need: 1 },
        ],
    },
    {
        target: CardKinds.Blue,
        key: 29,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 1 },
            { material: CardKinds.Purple, need: 2 },
        ],
    },
    {
        target: CardKinds.Blue,
        key: 30,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 1 },
            { material: CardKinds.Green, need: 1 },
            { material: CardKinds.Red, need: 2 },
            { material: CardKinds.Purple, need: 1 },
        ],
    },
    {
        target: CardKinds.Blue,
        key: 31,
        score: 0,
        materials: [{ material: CardKinds.Purple, need: 3 }],
    },
    // 白色
    {
        target: CardKinds.White,
        key: 32,
        score: 0,
        materials: [
            { material: CardKinds.Red, need: 2 },
            { material: CardKinds.Purple, need: 1 },
        ],
    },
    {
        target: CardKinds.White,
        key: 33,
        score: 0,
        materials: [
            { material: CardKinds.Green, need: 1 },
            { material: CardKinds.Blue, need: 1 },
            { material: CardKinds.Red, need: 1 },
            { material: CardKinds.Purple, need: 1 },
        ],
    },
    {
        target: CardKinds.White,
        key: 34,
        score: 0,
        materials: [
            { material: CardKinds.White, need: 3 },
            { material: CardKinds.Blue, need: 1 },
            { material: CardKinds.Purple, need: 1 },
        ],
    },
    {
        target: CardKinds.White,
        key: 35,
        score: 0,
        materials: [
            { material: CardKinds.Green, need: 2 },
            { material: CardKinds.Blue, need: 2 },
            { material: CardKinds.Purple, need: 1 },
        ],
    },
    {
        target: CardKinds.White,
        key: 36,
        score: 0,
        materials: [
            { material: CardKinds.Green, need: 2 },
            { material: CardKinds.Blue, need: 1 },
            { material: CardKinds.Red, need: 1 },
            { material: CardKinds.Purple, need: 1 },
        ],
    },
    {
        target: CardKinds.White,
        key: 37,
        score: 0,
        materials: [{ material: CardKinds.Blue, need: 3 }],
    },
    {
        target: CardKinds.White,
        key: 38,
        score: 0,
        materials: [
            { material: CardKinds.Blue, need: 2 },
            { material: CardKinds.Purple, need: 2 },
        ],
    },
    {
        target: CardKinds.White,
        key: 39,
        score: 1,
        materials: [{ material: CardKinds.Green, need: 4 }],
    },
];
